package com.lifeng.config;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * Created by lifeng on 2019/8/9.
 * 使用自己实现别的加密方式
 */
public class Md5PasswordEncoder implements PasswordEncoder {
    @Override
    public String encode(CharSequence charSequence) {
        //对密码加密,此处我就不加密了
        return charSequence.toString();
    }

    @Override
    public boolean matches(CharSequence charSequence, String s) {
        return s.equals(charSequence);
    }
}
